package com.dd.controller;

import com.dd.entity.R;
import com.dd.service.IPurchaseSettlementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 * 采购结算表 前端控制器
 * </p>
 *
 * @author dhd
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/purchaseSettlement")
public class PurchaseSettlementController {

    @Autowired
    private IPurchaseSettlementService purchaseSettlementService;

    @GetMapping("/selectPurchaseSettlementSuppliers")
    public R selectPurchaseSettlementSuppliers(@RequestParam("pageNum") int pageNum) {
        return R.success(purchaseSettlementService.selectPurchaseSettlementSuppliers(pageNum));
    }

    @PostMapping("/updatePurchaseSettlementStatus")
    public R updatePurchaseSettlementStatus(@RequestParam("poId") String poId,@RequestParam("supplierId") int supplierId){
        return R.success(purchaseSettlementService.updateStatus(poId,supplierId));
    }

}
